package leetcode.code0326;

public class Solution extends Solution326 {

	@Override
	public boolean isPowerOfThree(int n) {
		while (n != 0 && n % 3 == 0) {
			n /= 3;
		}
		if (n == 1)
			return true;
		return false;
	}

	public static void main(String[] args) {
		Solution so = new Solution();
		so.debug1();
		so.debug2();
		so.debug3();
		so.debug4();
	}

}
